package org.jivesoftware.smackx.pubsub;

public class SubscribeExtension extends NodeExtension
{
  protected String jid;

  public SubscribeExtension(String paramString)
  {
    super(PubSubElementType.SUBSCRIBE);
    this.jid = paramString;
  }

  public SubscribeExtension(String paramString1, String paramString2)
  {
    super(PubSubElementType.SUBSCRIBE, paramString2);
    this.jid = paramString1;
  }

  public String getJid()
  {
    return this.jid;
  }

  public String toXML()
  {
    StringBuilder localStringBuilder = new StringBuilder("<");
    localStringBuilder.append(getElementName());
    if (getNode() != null)
    {
      localStringBuilder.append(" node='");
      localStringBuilder.append(getNode());
      localStringBuilder.append("'");
    }
    localStringBuilder.append(" jid='");
    localStringBuilder.append(getJid());
    localStringBuilder.append("'/>");
    return localStringBuilder.toString();
  }
}